package com.ruoyi.leaveMessage.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.leaveMessage.mapper.ShLeaveMessageMapper;
import com.ruoyi.leaveMessage.domain.ShLeaveMessage;
import com.ruoyi.leaveMessage.service.IShLeaveMessageService;
import com.ruoyi.common.core.text.Convert;

/**
 * 留言管理Service业务层处理
 * 
 * @author GGB
 * @date 2021-09-23
 */
@Service
public class ShLeaveMessageServiceImpl implements IShLeaveMessageService 
{
    @Autowired
    private ShLeaveMessageMapper shLeaveMessageMapper;

    /**
     * 查询留言管理
     * 
     * @param id 留言管理ID
     * @return 留言管理
     */
    @Override
    public ShLeaveMessage selectShLeaveMessageById(Long id)
    {
        return shLeaveMessageMapper.selectShLeaveMessageById(id);
    }

    /**
     * 查询留言管理列表
     * 
     * @param shLeaveMessage 留言管理
     * @return 留言管理
     */
    @Override
    public List<ShLeaveMessage> selectShLeaveMessageList(ShLeaveMessage shLeaveMessage)
    {
        return shLeaveMessageMapper.selectShLeaveMessageList(shLeaveMessage);
    }

    /**
     * 新增留言管理
     * 
     * @param shLeaveMessage 留言管理
     * @return 结果
     */
    @Override
    public int insertShLeaveMessage(ShLeaveMessage shLeaveMessage)
    {
        return shLeaveMessageMapper.insertShLeaveMessage(shLeaveMessage);
    }

    /**
     * 修改留言管理
     * 
     * @param shLeaveMessage 留言管理
     * @return 结果
     */
    @Override
    public int updateShLeaveMessage(ShLeaveMessage shLeaveMessage)
    {
        return shLeaveMessageMapper.updateShLeaveMessage(shLeaveMessage);
    }

    /**
     * 删除留言管理对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteShLeaveMessageByIds(String ids)
    {
        return shLeaveMessageMapper.deleteShLeaveMessageByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除留言管理信息
     * 
     * @param id 留言管理ID
     * @return 结果
     */
    @Override
    public int deleteShLeaveMessageById(Long id)
    {
        return shLeaveMessageMapper.deleteShLeaveMessageById(id);
    }
}
